import TopHead from "../../pages/components/TopHead/TopHead";
import {Redirect, Route, Switch} from "react-router-dom";
import {Layout} from "antd";
import React from "react";
import WorkSiteRoute from "../WorkSiteRoute/WorkSiteRoute";
import MapRoute from "../MapRoute/MapRoute";
import ChartRoute from "../ChartRoute/ChartRoute";
import MaterialRoute from "../MaterialRoute/MaterialRoute";
import DataCenterRoute from "../DataCenterRoute/DataCenterRoute";
import MeDataRoute from "../MeDataRoute/MeDataRoute";
import AiLabRoute from "../AiLabRoute/AiLabRoute";
import SqlRoute from "../SqlRoute/SqlRoute";
import UxNewRoute from "../UxNewRoute/UxNewRoute";
export default (props)=>{
	let {pathname}=props.location;
	return(
		<Layout>
			<TopHead pathname={pathname} />
			<Switch>
				<Route path="/work" component={WorkSiteRoute} />
				<Route path="/map" component={MapRoute} />
				<Route path="/chart" component={ChartRoute} />
				<Route path="/material" component={MaterialRoute} />
				<Route path="/dataCenter" component={DataCenterRoute} />
				<Route path="/meData" component={MeDataRoute} />
				<Route path="/ai-lab" component={AiLabRoute} />
				<Route path="/sql" component={SqlRoute} />
				<Route path="/uxNew" component={UxNewRoute} />
				<Redirect to={{ pathname: "/work" }} />
			</Switch>
		</Layout>
	)
}
